
#ifndef _PAGEPROTOCL_H_
#define _PAGEPROTOCL_H_

#include <QVariant>
#include "operator.h"

#define SET_SELF_DESTROY_STATUS "selfDestroyParse"
#define SET_TIMEOUT_STATUS "timeOut"

class PageProtocol {
    public:
        virtual void didLoadStart(Operator* /* opt */) {}
        virtual void didInitialized(Operator* /* opt */) {}
        virtual void didLoadStarted(Operator* /* opt */) {}
        virtual void didLoadFinished(Operator* /* opt */, const QString & /* status */) {}
        virtual void didJavaScriptAlertSent(Operator* /* opt */, const QString & /* msg */) {}
        virtual void didJavaScriptConsoleMessageSent(Operator* /* opt */, const QString & /* message */) {}
        virtual void didJavaScriptErrorSent(Operator* /* opt */, const QString & /* msg */, const QString & /* stack */) {}
        virtual void didResourceRequested(Operator* /* opt */, const QVariant & /* requestData */, QObject * /* request */) {}
        virtual void didResourceReceived(Operator* /* opt */, const QVariant & /* resource */) {}
        virtual void didResourceError(Operator* /* opt */, const QVariant & /* errorData */) {}
        virtual void didResourceTimeout(Operator* /* opt */, const QVariant & /* errorData */) {}
        virtual void didUrlChanged(Operator* /* opt */, const QUrl & /* url */) {}
        virtual void didNavigationRequested(Operator* /* opt */, const QUrl & /* url */, const QString & /* navigationType */, bool /* navigationLocked */, bool /* isMainFrame */) {}
        virtual void didRawPageCreated(Operator* /* opt */, QObject * /* page */) {}
        virtual void didClosing(Operator* /* opt */, QObject * /* page */) {}
        virtual void didSelfDestroyParse(Operator* /* opt */, QString & /* status */) {}
        virtual void didTimeout(Operator* /* opt */, QString & /* status */) {}
};

#endif

